<?php //if (!defined('TL_ROOT')) die('You cannot access this file directly!');

/**
 * Contao Open Source CMS
 * Copyright (C) 2005-2011 Leo Feyer
 *
 * Formerly known as TYPOlight Open Source CMS.
 *
 * This program is free software: you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation, either
 * version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this program. If not, please visit the Free
 * Software Foundation website at <http://www.gnu.org/licenses/>.
 *
 * PHP version 5
 * @copyright  Stefan Melz 2012
 * @author     Stefan Melz
 * @package    z_smpdf
 * @license    GNU
 * @filesource
 */


/**
 * Class z_smpdf
 *
 * @copyright  Stefan Melz 2012
 * @author     Stefan Melz
 * @package    Controller
 */

class mypdfhf extends TCPDF {


    /**
     *Page header
     */
    public function Header() {
       //streifen links
        $this->Rect(15, 0, 12.5, 297, 'F', $style, array(2, 101, 203));
        // Logo
        $this->Image('tl_files/solana/pdf/solana_logo.png',157,3.4,37.5,38.7);
        // Set font
        //logotext
        $logotext ='
            <span style="color:#0066CC; font-weight:bold; font-size:1.1em;">Solana GmbH & Co. KG
            </span><br /><span style="color:#777">Albert-Einstein-Ring 5<br />
            22761 Hamburg <br />
            Telefon +49 (0)40 41 42 36-0 <br />
            Fax +49 (0)40 44 85 85 <br />
            info@solana.de <br />
            www.solana.de
            </span>';
        //logo unterschrift
        $this->SetFont('helvetica', '', 8, '', true);
        $this->writeHTMLCell(43,20,157,45,$logotext,$border,$ln,false,false,'left',true);
}

    /**
     * Page footer
     */
    public function Footer()
    {
        // Add footer text
       // $pdf->writeHTMLCell($w=0, $h=0, $x='40', $y='283', $footer, $border=0, $ln=1, $fill=0, $reseth=true, $align='center', $autopadding=true);
        $footertop='Vorstehende Angaben sind nach bestem Wissen und Gewissen erstellt,';
        $footerbottom='da Kartoffeln aber Naturprodukte sind, kann keine Haftung für diese Angaben übernommen werden.';
        // Position at 15 mm from bottom
        $this->SetY(-12);
        $this->SetX(40);
        // Set font
        $this->SetFont('helvetica', '', 8);
        // Page number
        $this->Cell('','', $footertop, 0, false, 'C', 0, '', 0, false, 'C', 'M');
        //unterer Teil
        $this->SetY(-9);
        $this->SetX(40);
        $this->Cell('','', $footerbottom, 0, false, 'C', 0, '', 0, false, 'C', 'M');
    }
}
?>